home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
os20
/
cdity
/
yak14a.lha
/
Yak
/
EnglishDocs
/
HotKeys.doc
next >
Wrap
Text File
|
1993-01-07
|
5KB
|
202 lines
This information is adapted from the ToolManager V2 documentation, and
is reproduced with kind permission of that program's author, Stefan
Becker.
How to define a Hot Key
************************
This chapter describes how to define a Hot Key as an Input
Description String, which is then parsed by Commodities. Each time a
Hot Key is activated Commodities generates an event which is used by
a Commodity in the chain. A description string has the following
syntax:
[<class>] {[-][<qualifier>]} [-][upstroke] [<key code>]
All keywords are case insensitive.
`class' describes the InputEvent class. This parameter is optional
and if it is missing the default `rawkey' is used. See InputEvent
classes.
Qualifiers are "signals" that must be set or cleared by the time the
Hot Key is activated; otherwise no event will be generated. For each
qualifier that must be set you supply its keyword. All other qualifiers
are expected to be cleared by default. If you want to ignore a
qualifier, just set a `-' before its keyword. See Qualifiers.
Normally a Hot Key event is generated when a key is pressed. If the
event should be generated when the key is released, supply the keyword
`upstroke'. When both press and release of the key should generate an
event, use `-upstroke'.
The key code is depending on the InputEvent class. See Key codes.
Note: Choose your hot keys *carefully*, because Commodities has a
high priority in the InputEvent handler chain (i.e. will override
existing definitions).
InputEvent classes
===================
Commodities supports most of the InputEvent classes that are
generated by the input.device. This section describes those classes
that are most useful for Hot Keys.
`rawkey'
This is the default class and covers all keyboard events. For
example `rawkey a' or `a' creates an event every time when the key
"a" is pressed. You must specify a key code for this class. See
rawkey key codes.
`rawmouse'
This class describes all mouse button events. You must specify a
key code for this class. See rawmouse key codes.
`diskinserted'
Events of this class are generated when a disk is inserted in a
drive. This class has no key codes.
`diskremoved'
Events of this class are generated when a disk is removed from a
drive. This class has no key codes.
Qualifiers
===========
Some keyword synonyms were added to Commodities V38. These are
marked with an `*'.
`lshift', `left_shift' *
Left shift key.
`rshift', `right_shift' *
Right shift key.
`shift'
Either shift key.
`capslock', `caps_lock' *
Caps lock key.
`caps'
Either shift key or caps lock key.
`control', `ctrl' *
Control key.
`lalt', `left_alt' *
Left alt key.
`ralt', `right_alt' *
Right alt key.
`alt'
Either alt key.
`lcommand', `lamiga' *, `left_amiga' *, `left_command' *
Left Amiga/Command key.
`rcommand', `ramiga' *, `right_amiga' *, `right_command' *
Right Amiga/Command key.
`numericpad', `numpad' *, `num_pad' *, `numeric_pad' *
This keyword *must* be used for any key on the numeric pad.
`leftbutton', `lbutton' *, `left_button' *
Left mouse button. See note below.
`midbutton', `mbutton' *, `middlebutton' *, `middle_button' *
Middle mouse button. See note below.
`rbutton', `rightbutton' *, `right_button' *
Right mouse button. See note below.
`repeat'
This qualifier is set when the keyboard repeat is active. Only
useful for InputEvent class `rawkey'.
Note: Commodities V37 has a bug which prevents the use of
`leftbutton', `midbutton' and `rbutton' as qualifiers. This bug is
fixed in V38.
Key codes
==========
Each InputEvent class has its own key codes:
Key codes for InputEvent class `rawkey'
----------------------------------------
Some keywords and synonyms were added to Commodities V38. These are
marked with an `*'.
`a'-`z', `0'-`9', ...
ASCII characters.
`f1', `f2', ..., `f10', `f11' *, `f12' *
Function keys.
`up', `cursor_up' *, `down', `cursor_down' *
`left', `cursor_left' *, `right', `cursor_right' *
Cursor keys.
`esc', `escape' *, `backspace', `del', `help'
`tab', `comma', `return', `space', `spacebar' *
Special keys.
`enter', `insert' *, `delete' *
`page_up' *, `page_down' *, `home' *, `end' *
Numeric Pad keys. Each of these key codes *must* be used with the
`numericpad' qualifier keyword!
Key codes for InputEvent class `rawmouse'
------------------------------------------
These keywords were added to Commodities V38. They are not available
in V37.
`mouse_leftpress'
Press left mouse button.
`mouse_middlepress'
Press middle mouse button.
`mouse_rightpress'
Press right mouse button.
Note: To use one of these key codes, you must also set the
corresponding qualifier keyword, e.g.
rawmouse leftbutton mouse_leftpress
Examples for Hot Keys
======================
`ralt t'
Hold right Alt key and press "t"
`ralt lalt t'
Hold left *and* right Alt key and press "t"
`alt t'
Hold either Alt key and press "t"
`rcommand f2'
Hold right Amiga key and press the second function key
`numericpad enter'
Press the Enter key on the numeric pad
`rawmouse midbutton leftbutton mouse_leftpress'
Hold middle mouse button and press the the left mouse button
`diskinserted'
Insert a disk in any drive.